Optimal. Leaf size=113 \[ -\frac {2 (e f-d g) \left (c f^2+a g^2\right ) \sqrt {f+g x}}{g^4}+\frac {2 \left (a e g^2+c f (3 e f-2 d g)\right ) (f+g x)^{3/2}}{3 g^4}-\frac {2 c (3 e f-d g) (f+g x)^{5/2}}{5 g^4}+\frac {2 c e (f+g x)^{7/2}}{7 g^4} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 113, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.045, Rules used = {786}
\begin {gather*} -\frac {2 \sqrt {f+g x} \left (a g^2+c f^2\right ) (e f-d g)}{g^4}+\frac {2 (f+g x)^{3/2} \left (a e g^2+c f (3 e f-2 d g)\right )}{3 g^4}-\frac {2 c (f+g x)^{5/2} (3 e f-d g)}{5 g^4}+\frac {2 c e (f+g x)^{7/2}}{7 g^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 786
Rubi steps
\begin {align*} \int \frac {(d+e x) \left (a+c x^2\right )}{\sqrt {f+g x}} \, dx &=\int \left (\frac {(-e f+d g) \left (c f^2+a g^2\right )}{g^3 \sqrt {f+g x}}+\frac {\left (a e g^2+c f (3 e f-2 d g)\right ) \sqrt {f+g x}}{g^3}+\frac {c (-3 e f+d g) (f+g x)^{3/2}}{g^3}+\frac {c e (f+g x)^{5/2}}{g^3}\right ) \, dx\\ &=-\frac {2 (e f-d g) \left (c f^2+a g^2\right ) \sqrt {f+g x}}{g^4}+\frac {2 \left (a e g^2+c f (3 e f-2 d g)\right ) (f+g x)^{3/2}}{3 g^4}-\frac {2 c (3 e f-d g) (f+g x)^{5/2}}{5 g^4}+\frac {2 c e (f+g x)^{7/2}}{7 g^4}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 94, normalized size = 0.83 \begin {gather*} \frac {2 \sqrt {f+g x} \left (35 a g^2 (-2 e f+3 d g+e g x)+7 c d g \left (8 f^2-4 f g x+3 g^2 x^2\right )-3 c e \left (16 f^3-8 f^2 g x+6 f g^2 x^2-5 g^3 x^3\right )\right )}{105 g^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.06, size = 105, normalized size = 0.93
method | result | size |
gosper | \(\frac {2 \sqrt {g x +f}\, \left (15 c e \,x^{3} g^{3}+21 c d \,g^{3} x^{2}-18 c e f \,g^{2} x^{2}+35 a e \,g^{3} x -28 c d f \,g^{2} x +24 c e \,f^{2} g x +105 a d \,g^{3}-70 a e f \,g^{2}+56 c d \,f^{2} g -48 c e \,f^{3}\right )}{105 g^{4}}\) | \(101\) |
trager | \(\frac {2 \sqrt {g x +f}\, \left (15 c e \,x^{3} g^{3}+21 c d \,g^{3} x^{2}-18 c e f \,g^{2} x^{2}+35 a e \,g^{3} x -28 c d f \,g^{2} x +24 c e \,f^{2} g x +105 a d \,g^{3}-70 a e f \,g^{2}+56 c d \,f^{2} g -48 c e \,f^{3}\right )}{105 g^{4}}\) | \(101\) |
risch | \(\frac {2 \sqrt {g x +f}\, \left (15 c e \,x^{3} g^{3}+21 c d \,g^{3} x^{2}-18 c e f \,g^{2} x^{2}+35 a e \,g^{3} x -28 c d f \,g^{2} x +24 c e \,f^{2} g x +105 a d \,g^{3}-70 a e f \,g^{2}+56 c d \,f^{2} g -48 c e \,f^{3}\right )}{105 g^{4}}\) | \(101\) |
derivativedivides | \(\frac {\frac {2 c e \left (g x +f \right )^{\frac {7}{2}}}{7}+\frac {2 \left (\left (d g -e f \right ) c -2 c e f \right ) \left (g x +f \right )^{\frac {5}{2}}}{5}+\frac {2 \left (-2 \left (d g -e f \right ) c f +e \left (a \,g^{2}+c \,f^{2}\right )\right ) \left (g x +f \right )^{\frac {3}{2}}}{3}+2 \left (d g -e f \right ) \left (a \,g^{2}+c \,f^{2}\right ) \sqrt {g x +f}}{g^{4}}\) | \(105\) |
default | \(\frac {\frac {2 c e \left (g x +f \right )^{\frac {7}{2}}}{7}+\frac {2 \left (\left (d g -e f \right ) c -2 c e f \right ) \left (g x +f \right )^{\frac {5}{2}}}{5}+\frac {2 \left (-2 \left (d g -e f \right ) c f +e \left (a \,g^{2}+c \,f^{2}\right )\right ) \left (g x +f \right )^{\frac {3}{2}}}{3}+2 \left (d g -e f \right ) \left (a \,g^{2}+c \,f^{2}\right ) \sqrt {g x +f}}{g^{4}}\) | \(105\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 110, normalized size = 0.97 \begin {gather*} \frac {2 \, {\left (15 \, {\left (g x + f\right )}^{\frac {7}{2}} c e + 21 \, {\left (c d g - 3 \, c f e\right )} {\left (g x + f\right )}^{\frac {5}{2}} - 35 \, {\left (2 \, c d f g - 3 \, c f^{2} e - a g^{2} e\right )} {\left (g x + f\right )}^{\frac {3}{2}} + 105 \, {\left (c d f^{2} g + a d g^{3} - c f^{3} e - a f g^{2} e\right )} \sqrt {g x + f}\right )}}{105 \, g^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.85, size = 99, normalized size = 0.88 \begin {gather*} \frac {2 \, {\left (21 \, c d g^{3} x^{2} - 28 \, c d f g^{2} x + 56 \, c d f^{2} g + 105 \, a d g^{3} + {\left (15 \, c g^{3} x^{3} - 18 \, c f g^{2} x^{2} - 48 \, c f^{3} - 70 \, a f g^{2} + {\left (24 \, c f^{2} g + 35 \, a g^{3}\right )} x\right )} e\right )} \sqrt {g x + f}}{105 \, g^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 374 vs.
\(2 (114) = 228\).
time = 16.63, size = 374, normalized size = 3.31 \begin {gather*} \begin {cases} \frac {- \frac {2 a d f}{\sqrt {f + g x}} - 2 a d \left (- \frac {f}{\sqrt {f + g x}} - \sqrt {f + g x}\right ) - \frac {2 a e f \left (- \frac {f}{\sqrt {f + g x}} - \sqrt {f + g x}\right )}{g} - \frac {2 a e \left (\frac {f^{2}}{\sqrt {f + g x}} + 2 f \sqrt {f + g x} - \frac {\left (f + g x\right )^{\frac {3}{2}}}{3}\right )}{g} - \frac {2 c d f \left (\frac {f^{2}}{\sqrt {f + g x}} + 2 f \sqrt {f + g x} - \frac {\left (f + g x\right )^{\frac {3}{2}}}{3}\right )}{g^{2}} - \frac {2 c d \left (- \frac {f^{3}}{\sqrt {f + g x}} - 3 f^{2} \sqrt {f + g x} + f \left (f + g x\right )^{\frac {3}{2}} - \frac {\left (f + g x\right )^{\frac {5}{2}}}{5}\right )}{g^{2}} - \frac {2 c e f \left (- \frac {f^{3}}{\sqrt {f + g x}} - 3 f^{2} \sqrt {f + g x} + f \left (f + g x\right )^{\frac {3}{2}} - \frac {\left (f + g x\right )^{\frac {5}{2}}}{5}\right )}{g^{3}} - \frac {2 c e \left (\frac {f^{4}}{\sqrt {f + g x}} + 4 f^{3} \sqrt {f + g x} - 2 f^{2} \left (f + g x\right )^{\frac {3}{2}} + \frac {4 f \left (f + g x\right )^{\frac {5}{2}}}{5} - \frac {\left (f + g x\right )^{\frac {7}{2}}}{7}\right )}{g^{3}}}{g} & \text {for}\: g \neq 0 \\\frac {a d x + \frac {a e x^{2}}{2} + \frac {c d x^{3}}{3} + \frac {c e x^{4}}{4}}{\sqrt {f}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.65, size = 134, normalized size = 1.19 \begin {gather*} \frac {2 \, {\left (105 \, \sqrt {g x + f} a d + \frac {35 \, {\left ({\left (g x + f\right )}^{\frac {3}{2}} - 3 \, \sqrt {g x + f} f\right )} a e}{g} + \frac {7 \, {\left (3 \, {\left (g x + f\right )}^{\frac {5}{2}} - 10 \, {\left (g x + f\right )}^{\frac {3}{2}} f + 15 \, \sqrt {g x + f} f^{2}\right )} c d}{g^{2}} + \frac {3 \, {\left (5 \, {\left (g x + f\right )}^{\frac {7}{2}} - 21 \, {\left (g x + f\right )}^{\frac {5}{2}} f + 35 \, {\left (g x + f\right )}^{\frac {3}{2}} f^{2} - 35 \, \sqrt {g x + f} f^{3}\right )} c e}{g^{3}}\right )}}{105 \, g} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.07, size = 100, normalized size = 0.88 \begin {gather*} \frac {{\left (f+g\,x\right )}^{3/2}\,\left (6\,c\,e\,f^2-4\,c\,d\,f\,g+2\,a\,e\,g^2\right )}{3\,g^4}+\frac {2\,c\,e\,{\left (f+g\,x\right )}^{7/2}}{7\,g^4}+\frac {2\,c\,{\left (f+g\,x\right )}^{5/2}\,\left (d\,g-3\,e\,f\right )}{5\,g^4}+\frac {2\,\sqrt {f+g\,x}\,\left (c\,f^2+a\,g^2\right )\,\left (d\,g-e\,f\right )}{g^4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________